﻿Imports Microsoft.VisualBasic
Imports System.Data

Public Class clsVariedad
    Inherits clsDatos

    Dim strSQL As String

    Function Get_Variedad() As DataTable

        Return GetDatos("select * from artcatvariedad order by artvariedad")

    End Function

    Function Get_Variedad(ByVal strFamilia As String) As DataTable

        strSQL = "Select distinct familia, vacavariedad artvariedad "
        strSQL = strSQL & "from art "
        strSQL = strSQL & "where estatus='ALTA' and familia like '%" & strFamilia & "%'"

        Return GetDatos(strSQL)

    End Function

    Function Do_BuscaVariedades(ByVal strFamilia As String, ByVal strVariedad As String) As DataTable

        strSQL = "Select distinct vacavariedad artvariedad "
        strSQL = strSQL & "from art "
        strSQL = strSQL & "where estatus='ALTA' "
        strSQL = strSQL & "and familia='" & strFamilia & "' "
        strSQL = strSQL & "and vacavariedad = '" & strVariedad & "'"

        Return GetDatos(strSQL)

    End Function

End Class
